package com.sunny.wordstudy;

import android.app.Activity;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TextView;
import com.sunny.wordstudy.lib.Stat;

public class StudyStatusView extends Activity
{
  Stat iStat = Stat.getInstance();
  long nTotalLearnedNum = 0L;

  private void setDBStatus()
  {
    TextView localTextView = (TextView)findViewById(2131230720);
    StringBuilder localStringBuilder1 = new StringBuilder(String.valueOf(this.iStat.getStudyBookName()));
    Resources localResources1 = getResources();
    Object[] arrayOfObject1 = new Object[2];
    arrayOfObject1[0] = Long.valueOf(this.nTotalLearnedNum);
    arrayOfObject1[1] = Long.valueOf(this.iStat.getBookWords());
    String str = localResources1.getString(2131165189, arrayOfObject1);
    long l = this.iStat.getTotalLearnedTime() + this.iStat.getSessionLearnedTime() / 60L;
    StringBuilder localStringBuilder2 = new StringBuilder(String.valueOf(str));
    Resources localResources2 = getResources();
    Object[] arrayOfObject2 = new Object[2];
    arrayOfObject2[0] = Long.valueOf(l / 60L);
    arrayOfObject2[1] = Long.valueOf(l % 60L);
    localTextView.setText(localResources2.getString(2131165188, arrayOfObject2));
  }

  private void setSessionValues()
  {
    ((TextView)findViewById(2131230725)).setText("开始学习时间:" + this.iStat.getSessionTime().substring(0, 9));
    TextView localTextView = (TextView)findViewById(2131230726);
    long l = this.iStat.getSessionLearnedTime() / 60L;
    StringBuilder localStringBuilder = new StringBuilder("已经学习时长:");
    Object[] arrayOfObject = new Object[3];
    arrayOfObject[0] = Long.valueOf(l / 60L);
    arrayOfObject[1] = Long.valueOf(l % 60L);
    arrayOfObject[2] = Long.valueOf(this.iStat.getSessionLearnedTime() % 60L);
    localTextView.setText(String.format("%2d:%2d:%2d", arrayOfObject));
    ((TextView)findViewById(2131230724)).setText("累计学习单词:" + String.valueOf(this.nTotalLearnedNum));
    ((TextView)findViewById(2131230727)).setText("本次新学:" + String.valueOf(this.iStat.getIntroduceNum()));
    ((TextView)findViewById(2131230728)).setText("本次复习:" + String.valueOf(this.iStat.getReviewNum()));
    ((TextView)findViewById(2131230729)).setText("本次学习次数:" + String.valueOf(this.iStat.getWordNum()));
    ((TextView)findViewById(2131230730)).setText("正确次数:" + String.valueOf(this.iStat.getTestOkNum()));
    ((TextView)findViewById(2131230731)).setText("失败次数:" + String.valueOf(this.iStat.getTestFailNum()));
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903042);
    this.nTotalLearnedNum = this.iStat.getTotalIntroducedWords();
    setDBStatus();
    setSessionValues();
  }
}

/* Location:           E:\Desktop\Android\yanguangbeidanci\classes_dex2jar.jar
 * Qualified Name:     com.sunny.wordstudy.StudyStatusView
 * JD-Core Version:    0.5.3
 */